<template>
  <!-- 封装的查询一行 -->
  <div
    style="
      position: relative;
      transform: translateY(-20px);
      padding-left: 17%;
    "
  >
    <input
      class="cell-input"
      type="select"
      :placeholder="placeholder"
      ref="cell-input"
    />
    <div class="time-container">
      <span class="time-part date"></span>
      <span class="time-part time"></span>
    </div>
    <button class="btn-search" @click="childclick()">查询</button>
  </div>
</template>

<script>
export default {
  name: "cnSearch",
  props : {
    placeholder: {
      type: String,
      default: "请输入电池编号："
	}
  },
  methods: {
    //事件传递需要通过$emit来传递，参数cnclick要与父组件@后面的属性相对应
    childclick() {
      this.$emit('cnclick');
    }
  }
}
</script>

<style>
</style>